Optimal. Leaf size=144 \[ \frac {5 a^3 x}{32}-\frac {i a^7}{16 d (a-i a \tan (c+d x))^4}-\frac {i a^6}{12 d (a-i a \tan (c+d x))^3}-\frac {3 i a^5}{32 d (a-i a \tan (c+d x))^2}-\frac {i a^4}{8 d (a-i a \tan (c+d x))}+\frac {i a^4}{32 d (a+i a \tan (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3568, 46, 212}
\begin {gather*} -\frac {i a^7}{16 d (a-i a \tan (c+d x))^4}-\frac {i a^6}{12 d (a-i a \tan (c+d x))^3}-\frac {3 i a^5}{32 d (a-i a \tan (c+d x))^2}-\frac {i a^4}{8 d (a-i a \tan (c+d x))}+\frac {i a^4}{32 d (a+i a \tan (c+d x))}+\frac {5 a^3 x}{32} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 212
Rule 3568
Rubi steps
\begin {align*} \int \cos ^8(c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac {\left (i a^9\right ) \text {Subst}\left (\int \frac {1}{(a-x)^5 (a+x)^2} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^9\right ) \text {Subst}\left (\int \left (\frac {1}{4 a^2 (a-x)^5}+\frac {1}{4 a^3 (a-x)^4}+\frac {3}{16 a^4 (a-x)^3}+\frac {1}{8 a^5 (a-x)^2}+\frac {1}{32 a^5 (a+x)^2}+\frac {5}{32 a^5 \left (a^2-x^2\right )}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^7}{16 d (a-i a \tan (c+d x))^4}-\frac {i a^6}{12 d (a-i a \tan (c+d x))^3}-\frac {3 i a^5}{32 d (a-i a \tan (c+d x))^2}-\frac {i a^4}{8 d (a-i a \tan (c+d x))}+\frac {i a^4}{32 d (a+i a \tan (c+d x))}-\frac {\left (5 i a^4\right ) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \tan (c+d x)\right )}{32 d}\\ &=\frac {5 a^3 x}{32}-\frac {i a^7}{16 d (a-i a \tan (c+d x))^4}-\frac {i a^6}{12 d (a-i a \tan (c+d x))^3}-\frac {3 i a^5}{32 d (a-i a \tan (c+d x))^2}-\frac {i a^4}{8 d (a-i a \tan (c+d x))}+\frac {i a^4}{32 d (a+i a \tan (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.53, size = 131, normalized size = 0.91 \begin {gather*} \frac {a^3 (-180 i \cos (c+d x)+20 (-i+6 d x) \cos (3 (c+d x))+9 i \cos (5 (c+d x))-60 \sin (c+d x)+20 \sin (3 (c+d x))-120 i d x \sin (3 (c+d x))+15 \sin (5 (c+d x))) (\cos (3 (c+2 d x))+i \sin (3 (c+2 d x)))}{768 d (\cos (d x)+i \sin (d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.23, size = 176, normalized size = 1.22
method | result | size |
risch | \(\frac {5 a^{3} x}{32}-\frac {i a^{3} {\mathrm e}^{8 i \left (d x +c \right )}}{256 d}-\frac {5 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}}{192 d}-\frac {5 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}}{64 d}-\frac {9 i a^{3} \cos \left (2 d x +2 c \right )}{64 d}+\frac {11 a^{3} \sin \left (2 d x +2 c \right )}{64 d}\) | \(97\) |
derivativedivides | \(\frac {-i a^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{6}\left (d x +c \right )\right )}{8}-\frac {\left (\cos ^{6}\left (d x +c \right )\right )}{24}\right )-3 a^{3} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{7}\left (d x +c \right )\right )}{8}+\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{48}+\frac {5 d x}{128}+\frac {5 c}{128}\right )-\frac {3 i a^{3} \left (\cos ^{8}\left (d x +c \right )\right )}{8}+a^{3} \left (\frac {\left (\cos ^{7}\left (d x +c \right )+\frac {7 \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\cos ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \cos \left (d x +c \right )}{16}\right ) \sin \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) | \(176\) |
default | \(\frac {-i a^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{6}\left (d x +c \right )\right )}{8}-\frac {\left (\cos ^{6}\left (d x +c \right )\right )}{24}\right )-3 a^{3} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{7}\left (d x +c \right )\right )}{8}+\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{48}+\frac {5 d x}{128}+\frac {5 c}{128}\right )-\frac {3 i a^{3} \left (\cos ^{8}\left (d x +c \right )\right )}{8}+a^{3} \left (\frac {\left (\cos ^{7}\left (d x +c \right )+\frac {7 \left (\cos ^{5}\left (d x +c \right )\right )}{6}+\frac {35 \left (\cos ^{3}\left (d x +c \right )\right )}{24}+\frac {35 \cos \left (d x +c \right )}{16}\right ) \sin \left (d x +c \right )}{8}+\frac {35 d x}{128}+\frac {35 c}{128}\right )}{d}\) | \(176\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 128, normalized size = 0.89 \begin {gather*} \frac {15 \, {\left (d x + c\right )} a^{3} + \frac {15 \, a^{3} \tan \left (d x + c\right )^{7} + 55 \, a^{3} \tan \left (d x + c\right )^{5} + 73 \, a^{3} \tan \left (d x + c\right )^{3} + 16 i \, a^{3} \tan \left (d x + c\right )^{2} + 81 \, a^{3} \tan \left (d x + c\right ) - 32 i \, a^{3}}{\tan \left (d x + c\right )^{8} + 4 \, \tan \left (d x + c\right )^{6} + 6 \, \tan \left (d x + c\right )^{4} + 4 \, \tan \left (d x + c\right )^{2} + 1}}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 92, normalized size = 0.64 \begin {gather*} \frac {{\left (120 \, a^{3} d x e^{\left (2 i \, d x + 2 i \, c\right )} - 3 i \, a^{3} e^{\left (10 i \, d x + 10 i \, c\right )} - 20 i \, a^{3} e^{\left (8 i \, d x + 8 i \, c\right )} - 60 i \, a^{3} e^{\left (6 i \, d x + 6 i \, c\right )} - 120 i \, a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} + 12 i \, a^{3}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{768 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.34, size = 226, normalized size = 1.57 \begin {gather*} \frac {5 a^{3} x}{32} + \begin {cases} \frac {\left (- 25165824 i a^{3} d^{4} e^{10 i c} e^{8 i d x} - 167772160 i a^{3} d^{4} e^{8 i c} e^{6 i d x} - 503316480 i a^{3} d^{4} e^{6 i c} e^{4 i d x} - 1006632960 i a^{3} d^{4} e^{4 i c} e^{2 i d x} + 100663296 i a^{3} d^{4} e^{- 2 i d x}\right ) e^{- 2 i c}}{6442450944 d^{5}} & \text {for}\: d^{5} e^{2 i c} \neq 0 \\x \left (- \frac {5 a^{3}}{32} + \frac {\left (a^{3} e^{10 i c} + 5 a^{3} e^{8 i c} + 10 a^{3} e^{6 i c} + 10 a^{3} e^{4 i c} + 5 a^{3} e^{2 i c} + a^{3}\right ) e^{- 2 i c}}{32}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 514 vs. \(2 (112) = 224\).
time = 0.91, size = 514, normalized size = 3.57 \begin {gather*} \frac {240 \, a^{3} d x e^{\left (10 i \, d x + 6 i \, c\right )} + 960 \, a^{3} d x e^{\left (8 i \, d x + 4 i \, c\right )} + 1440 \, a^{3} d x e^{\left (6 i \, d x + 2 i \, c\right )} + 240 \, a^{3} d x e^{\left (2 i \, d x - 2 i \, c\right )} + 960 \, a^{3} d x e^{\left (4 i \, d x\right )} - 33 i \, a^{3} e^{\left (10 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 132 i \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 198 i \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 33 i \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 132 i \, a^{3} e^{\left (4 i \, d x\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 33 i \, a^{3} e^{\left (10 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x\right )} + e^{\left (-2 i \, c\right )}\right ) + 132 i \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x\right )} + e^{\left (-2 i \, c\right )}\right ) + 198 i \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x\right )} + e^{\left (-2 i \, c\right )}\right ) + 33 i \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} \log \left (e^{\left (2 i \, d x\right )} + e^{\left (-2 i \, c\right )}\right ) + 132 i \, a^{3} e^{\left (4 i \, d x\right )} \log \left (e^{\left (2 i \, d x\right )} + e^{\left (-2 i \, c\right )}\right ) - 6 i \, a^{3} e^{\left (18 i \, d x + 14 i \, c\right )} - 64 i \, a^{3} e^{\left (16 i \, d x + 12 i \, c\right )} - 316 i \, a^{3} e^{\left (14 i \, d x + 10 i \, c\right )} - 984 i \, a^{3} e^{\left (12 i \, d x + 8 i \, c\right )} - 1846 i \, a^{3} e^{\left (10 i \, d x + 6 i \, c\right )} - 1936 i \, a^{3} e^{\left (8 i \, d x + 4 i \, c\right )} - 984 i \, a^{3} e^{\left (6 i \, d x + 2 i \, c\right )} + 96 i \, a^{3} e^{\left (2 i \, d x - 2 i \, c\right )} - 96 i \, a^{3} e^{\left (4 i \, d x\right )} + 24 i \, a^{3} e^{\left (-4 i \, c\right )}}{1536 \, {\left (d e^{\left (10 i \, d x + 6 i \, c\right )} + 4 \, d e^{\left (8 i \, d x + 4 i \, c\right )} + 6 \, d e^{\left (6 i \, d x + 2 i \, c\right )} + d e^{\left (2 i \, d x - 2 i \, c\right )} + 4 \, d e^{\left (4 i \, d x\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.65, size = 125, normalized size = 0.87 \begin {gather*} \frac {5\,a^3\,x}{32}-\frac {\frac {5\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^4}{32}+\frac {a^3\,{\mathrm {tan}\left (c+d\,x\right )}^3\,15{}\mathrm {i}}{32}-\frac {35\,a^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{96}+\frac {a^3\,\mathrm {tan}\left (c+d\,x\right )\,5{}\mathrm {i}}{32}-\frac {a^3}{3}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^5-{\mathrm {tan}\left (c+d\,x\right )}^4\,3{}\mathrm {i}+2\,{\mathrm {tan}\left (c+d\,x\right )}^3-{\mathrm {tan}\left (c+d\,x\right )}^2\,2{}\mathrm {i}+3\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________